import React, {Component} from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  Dimensions
} from 'react-native';
import {Navigator} from 'react-native-deprecated-custom-components';
//引入主界面
import Home from './views/Start.js';

const {height, width} = Dimensions.get('window');
//相当于application,Navigatory一定要在应用启动的时候初始化
export default class App extends React.Component {
  constructor(props) {
    super(props);
  }
  render () {
    return (
      <Navigator style = {styles.container}
          initialRoute={{ name: 'Home', component: Home }}
          configureScene={(route) => {
            return Navigator.SceneConfigs.VerticalUpSwipeJump;
          }}
          renderScene={(route, navigator) => {
            let Component = route.component;
            return <Component {...route.params} navigator={navigator} />
          }}
      />
    )
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    height:height,
    width:width
  }
});
